package com.guigu.equipmentservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;

/**
 * <p>
 * 设备图片表
 * </p>
 *
 * @author zcy
 * @since 2025-09-28
 */
public class EquipmentImage {

    /**
     * 图片唯一标识
     */
    @TableId(value = "image_id", type = IdType.AUTO)
    private Long imageId;

    /**
     * 关联设备表 equipment_id
     */
    private Long equipmentId;

    /**
     * 图片 URL
     */
    private String imageUrl;

    /**
     * 是否封面图（0 - 否，1 - 是）
     */
    private Integer isCover;

    /**
     * 排序号（控制展示顺序）
     */
    private Integer sort;

    /**
     * 记录创建时间
     */
    private LocalDateTime createTime;

    // Getters and Setters
    public Long getImageId() {
        return imageId;
    }

    public void setImageId(Long imageId) {
        this.imageId = imageId;
    }

    public Long getEquipmentId() {
        return equipmentId;
    }

    public void setEquipmentId(Long equipmentId) {
        this.equipmentId = equipmentId;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public Integer getIsCover() {
        return isCover;
    }

    public void setIsCover(Integer isCover) {
        this.isCover = isCover;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "EquipmentImage{" +
                "imageId=" + imageId +
                ", equipmentId=" + equipmentId +
                ", imageUrl='" + imageUrl + '\'' +
                ", isCover=" + isCover +
                ", sort=" + sort +
                ", createTime=" + createTime +
                '}';
    }
}